import request from '@/utils/request'

//  查询部门列表
export function getSupervisionDeptList(params) {
  return request({
    url: '/business/system/sysSupervisionDept/list',
    method: 'get',
    params
  })
}

//  获取监管部门详情
export function getSysSupervisionDeptInfoById(id) {
  return request({
    url: `/business/system/sysSupervisionDept/${id}`,
    method: 'get',
  })
}

//  增加监管部门
export function addSupervisionDept(data) {
  return request({
    url: '/business/system/sysSupervisionDept/add',
    method: 'post',
    data
  })
}

//  更新监管部门
export function updateSupervisionDept(data) {
  return request({
    url: '/business/system/sysSupervisionDept/update',
    method: 'put',
    data
  })
}

//  删除监管部门
export function delSupervisionDept(id) {
  return request({
    url: `/business/system/sysSupervisionDept/${id}`,
    method: 'delete',
  })
}

//===========以下为监管部门管理员相关接口===========
/**
 * 新增监管部门管理员接口
 */
export function addDeptAdmin(params) {
  return request({
    url: `/business/system/sysSupervisionDept/createAdmin`,
    method: 'get',
    params
  })
}

/**
 * 修改监管部门管理员密码接口
 */
export function resetDeptAdminPwd(params) {
  return request({
    url: `/business/system/sysSupervisionDept/resetAdminPwd`,
    method: 'get',
    params
  })
}

//===========以上为监管部门管理员相关接口===========
